﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="WebStudio.Mvc.Core.XViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Test
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="<%=Url.Content("~/Areas/Admin/Views/Test/Validator.js")%>" type="text/javascript"></script>
    <script src="<%=Url.Content("~/Areas/Admin/Views/Test/Test.js")%>" type="text/javascript"></script>
    <form action="" method="post" onsubmit="return VRegister()">
    <p>
        用户名:<%= Html.TextBox("user","S") %>
         <label id="usertip" /> 
    </p>
    <p>
        密码:<%=Html.Password("pwd") %>
        <label id="pwdtip" />
    </p>
    <p>
        确认密码:<%=Html.TextBox("rpwd")%>
        <label id="rpwdtip" />
    </p>
    <p>
        邮件地址:<%=Html.TextBox("email") %>
        <label id="emailtip" />
    </p>
    <p>
        <input type="submit" value="注册" /></p>
    <p>
    </p>
    </form>
    <%
          JSValidator jsv = new JSValidator("VRegister");
          jsv.Add(jsv.Create("user", "usertip").NotNull("请输入用户名!", null),
              jsv.Create("pwd","pwdtip").NotNull("请输入密码!",null),
              jsv.Create("rpwd","rpwdtip").NotNull("请输入确认密码!",null).StringCompare("pwd", CompareType.eq,"密码不一致!",null),
              jsv.Create("email","emailtip").NotNull("请输入邮件地址!",null).EMail("非法邮件地址!",null));
    %>
    <%=jsv%>
</asp:Content>
